Ext.apply(Ext.form.VTypes,{
	 'long': function(value,field){
		return /^\d{3}\.\d{6}$/.test(value);
     },
     'longText': '经度输入错误！',
     'lat': function(value,field){
     	return /^\d{2}\.\d{6}$/.test(value);
     },
     'latText':'纬度输入错误！'
});

var fgys=new Hxcy.Factory("Hxcy.main.fgys");

/*
 * 覆盖延伸新建项目表单
 */
Hxcy.main.fgys.Form={
	fgysForm:{
		id:'h-form-createfgysform',
		layout:'column',
		xtype:'form',
		border:true,
		borderStyle:'padding:5px',
		layoutConfig:{
			labelAlign:'left',
			labelPad : 5,
			labelSeparator:':' 
		},
		defaults : {
			border:false,
			validateOnBlur : false,
			validationEvent : false,
			msgTarget : 'side'
		},
		url:'room/roomProject!start.action',
		items:[{
			columnWidth : .33,
			layout : 'form',
			labelWidth : 150,
			bodyStyle : 'padding-left:5px;',
			border:false,
			defaults : {
				border:false,
				xtype : 'textfield',
				anchor : '100%'
			},
			items:[{
				name:'roomProject.bizNumber',
				fieldLabel:'项目编号',
				value: '',//bizNumber
				readOnly:true
			},{
				name:'roomProject.address',
				fieldLabel:'项目地址'
			},{
				xtype: 'combo',
				hiddenName:'roomProject.areaType',
				readOnly : true,
				editable : false,
				mode:'local',
				fieldLabel:'区域性质',
				triggerAction : 'all',
				valueField : 'roomProject.areaType',
				displayField : 'areaDisplay',
				store: new Ext.data.SimpleStore({
					fields:['roomProject.areaType','areaDisplay'],
					data:[
						['普通小高层','普通小高层'],
						['高档小高层小区','高档小高层小区'],
						['普通高层小区','普通高层小区'],
						['高档高层小区','高档高层小区'],
						['大型商场','大型商场'],
						['中型商场','中型商场'],
						['小型商场','小型商场'],
						['室外商业街区','室外商业街区'],
						['大型办公楼','大型办公楼'],
						['中型办公楼','中型办公楼'],
						['普通办公楼','普通办公楼'],
						['小型办公楼','小型办公楼'],
						['五星级宾馆','五星级宾馆'],
						['四星级宾馆','四星级宾馆'],
						['三星级宾馆','三星级宾馆'],
						['二星级及以下宾馆','二星级及以下宾馆'],
						['娱乐休闲场所','娱乐休闲场所'],
						['地下空间休闲场所','地下空间休闲场所'],
						['餐饮场所','餐饮场所'],
						['农居点','农居点'],
						['工业园区','工业园区'],
						['校园','校园'],
						['隧道','隧道'],
						['景区','景区'],
						['大型桥梁','大型桥梁'],
						['干扰区域','干扰区域'],
						['行政村','行政村'],
						['自然村','自然村'],
						['车站码头','车站码头'],
						['专业市场','专业市场'],
						['多层','多层'],
						['电梯','电梯'],
						['其他营业场所','其他营业场所'],
						['其他地下场所','其他地下场所'],
						['地下车库','地下车库'],
						['无需覆盖区域','无需覆盖区域'],
						['普通道路','普通道路'],
						['大型医院','大型医院'],
						['中型医院','中型医院'],
						['小型医院','小型医院'],
						['二级甲等以上','二级甲等以上'],
						['二级甲等以下','二级甲等以下']
					]
				}),
				emptyText:'请选择区域性质...'
			},{
				xtype:'combo',
				hiddenName:'roomProject.projectType',
				fieldLabel:'项目分类',
				readOnly:false,
				editable:true,
				mode:'local',
				triggerAction:'all',
				valueField:'roomProject.projectType',
				displayField:'projectDisplay',
				store:new Ext.data.SimpleStore({
					fields:['roomProject.projectType','projectDisplay'],
					data:[
					['解决VIP投诉','解决VIP投诉'],
					['新区跟进','新区跟进'],
					['话务吸收','话务吸收'],
					['深度覆盖','深度覆盖'],
					['解决普通投诉','解决普通投诉'],
					['解决弱覆盖','解决弱覆盖'],
					['解决质差问题','解决质差问题'],
					['道路覆盖','道路覆盖'],
					['解决高层投诉','解决高层投诉']
					]
				}),
				emptyText:'请选择项目分类...'
			},{
				name:'roomProject.relatedCode',
				fieldLabel:'关联项目编号'
			},{
				name:'roomProject.siteNumber',
				fieldLabel:'站号'
			},{
				xtype:'lovcombo',
				fieldLabel:'解决内容',
				hiddenName:'roomProject.resolveContent',
				valueField:'roomProject.resolveContent',
				displayField:'jjnrDisplay',
				readOnly : false,
				editable : true,
				mode:'local',
				triggerAction : 'all',
				store:new Ext.data.SimpleStore({
					fields:['roomProject.resolveContent','jjnrDisplay'],
					data:[
						['主体','主体'],
						['电梯','电梯'],
						['地下室','地下室'],
						['分布+外挂','分布+外挂'],
						['小区分布','小区分布']
					]
				}),
				emptyText:'请选择解决内容...'
			},{
				xtype:'combo',
				fieldLabel:'电梯信号',
				hiddenName:'roomProject.liftSignal',
				readOnly : true,
				editable : false,
				mode:'local',
				triggerAction : 'all',
				valueField : 'roomProject.liftSignal',
				displayField : 'dtxhDisplay',
				store: new Ext.data.SimpleStore({
					fields:['roomProject.liftSignal','dtxhDisplay'],
					data:[['覆盖良好','覆盖良好'],['无覆盖','无覆盖'],['弱覆盖','弱覆盖']]
				}),
				emptyText:'请选择电梯信号...'
			},{
				xtype:'combo',
				fieldLabel:'地下车库信号',
				hiddenName:'roomProject.underParkSignal',
				valueField:'roomProject.underParkSignal',
				displayField:'dxckxhDisplay',
				readOnly : true,
				editable : false,
				mode:'local',
				triggerAction : 'all',
				store:new Ext.data.SimpleStore({
					fields:['roomProject.underParkSignal','dxckxhDisplay'],
					data:[['覆盖良好','覆盖良好'],['无覆盖','无覆盖'],['弱覆盖','弱覆盖']]
				}),
				emptyText:'请选择地下车库信号...'
			},{
				name:'',
				fieldLabel:'预计覆盖面积(平方米)'
			}]
		},{
			columnWidth : .33,
			layout : 'form',
			labelWidth : 120,
			bodyStyle : 'padding-right:5px;',
			border:false,
			defaults : {
				border:false,
				xtype : 'textfield',
				anchor : '100%'
			},
			items:[{
				name:'roomProject.name',
				fieldLabel:'项目名称'
			},{
				name:'roomProject.lon',
				fieldLabel:'经度',
				vtype:'long'
			},{
				xtype:'combo',
				fieldLabel:'是否新建',
				readOnly : true,
				editable : false,
				mode:'local',
				triggerAction : 'all',
				hiddenName:'roomProject.newCreate',
				valueField : 'roomProject.newCreate',
				displayField : 'iscreateDisplay',
				store: new Ext.data.SimpleStore({
					fields:['roomProject.newCreate','iscreateDisplay'],
					data:[['true','是'],['false','否']]
				}),
				emptyText:'请选择是否新建...'
			},{
				name:'',
				fieldLabel:'关联信息'
			},{
				name:'roomProject.siteName',
				fieldLabel:'站名'
			},{
				xtype:'numberfield',
				name:'roomProject.liftNumber',
				fieldLabel:'<font color=red>*</font>&nbsp电梯数量',
				allowBlank:false
			},{
				xtype:'numberfield',
				name:'roomProject.underParkSignal',
				fieldLabel:'<font color=red>*</font>&nbsp独立地下车库数量',
				allowBlank:false
			},{
				xtype:'combo',
				fieldLabel:'拟采取解决手段',
				hiddenName:'roomProject.resolveMethod',
				readOnly : true,
				editable : false,
				mode:'local',
				triggerAction : 'all',
				valueField : 'roomProject.resolveMethod',
				displayField : 'ncqjjsdDisplay',
				store: new Ext.data.SimpleStore({
					fields:['roomProject.resolveMethod','ncqjjsdDisplay'],
					data:[
						['主设备','主设备'],
						['基站耦合','基站耦合'],
						['光线直放站','光线直放站'],
						['分布直放站改造','分布直放站改造'],
						['室内专项优化','室内专项优化'],
						['GRRU','GRRU'],
						['无线直放站','无线直放站'],
						['RRU拉远','RRU拉远']
					]
				}),
				emptyText:'请选择拟采取解决手段...'
			},{
				xtype:'combo',
				hiddenName:'roomProject.factory',
				readOnly:false,
				editable:true,
				mode:'local',
				fieldLabel:'建议厂家',
				triggerAction:'all',
				valueField:'roomProject.factory',
				displayField:'factoryDisplay',
				store:new Ext.data.SimpleStore({
					fields:['roomProject.factory','factoryDisplay'],
					data:[
					['京邮','京邮'],
					['武邮','武邮'],
					['逸畅','逸畅'],
					['三维','三维'],
					['飞毛腿','飞毛腿'],
					['银河','银河'],
					['威力克','威力克'],
					['赛福','赛福']
					]
				}),
				emptyText:'请选择厂家...'
			}]
		},{
			columnWidth : .33,
			layout : 'form',
			labelWidth : 150,
			bodyStyle : 'padding-right:5px;',
			border:false,
			defaults : {
				border:false,
				xtype : 'textfield',
				anchor : '100%'
			},
			items:[{
				xtype: 'combo',
				hiddenName:'roomProject.area',
				readOnly : true,
				editable : false,
				mode:'local',
				fieldLabel:'所属区域',
				triggerAction : 'all',
				valueField : 'roomProject.area',
				displayField : 'siteDisplay',
				store: new Ext.data.SimpleStore({
					fields:['roomProject.area','siteDisplay'],
					data:[
						['西湖','西湖'],
						['江干','江干'],
						['武林','武林'],
						['拱墅','拱墅'],
						['滨江','滨江'],
						['下沙','下沙'],
						['余杭','余杭'],
						['富阳','富阳'],
						['萧山','萧山'],
						['桐庐','桐庐'],
						['建德','建德'],
						['淳安','淳安'],
						['临安','临安']
					]
				}),
				emptyText:'请选择区域...'
			},{
				name:'roomProject.telphone',
				fieldLabel:'<font color=red>*</font>&nbsp联系电话',
				allowBlank :false
			},{
				name:'roomProject.lat',
				fieldLabel:'纬度',
				vtype:'lat'
			},{
				xtype:'lovcombo',
				fieldLabel:'网络制式',
				readOnly : true,
				editable : false,
				mode:'local',
				triggerAction : 'all',
				hiddenName:'roomProject.netType',
				valueField : 'roomProject.netType',
				displayField : 'wangluoDisplay',
				store: new Ext.data.SimpleStore({
					fields:['roomProject.netType','wangluoDisplay'],
					data:[['GSM','GSM'],['TD-SCDMA','TD-SCDMA'],['LTE','LTE'],['WLAN','WLAN']]
				}),
				emptyText:'请选择网络制式...'
			},{
				xtype:'combo',
				fieldLabel:'期数',
				readOnly : false,
				editable : true,
				mode:'local',
				triggerAction : 'all',
				hiddenName:'roomProject.term',
				valueField : 'roomProject.term',
				displayField : 'qishuDisplay',
				store: new Ext.data.SimpleStore({
					fields:['roomProject.term','qishuDisplay'],
					data:[['G17','G17'],['遗留站点','遗留站点'],['G18','G18'],['双百站点','双百站点']]
				}),
				emptyText:'请选择期数...'
			},{
				name:'roomProject.bsc',
				fieldLabel:'BSC'
			},{
				xtype:'combo',
				fieldLabel:'主体信号 ',
				hiddenName:'roomProject.mainSignal',
				valueField:'roomProject.mainSignal',
				displayField:'ztxxDisplay',
				readOnly : true,
				editable : false,
				mode:'local',
				triggerAction : 'all',
				store:new Ext.data.SimpleStore({
					fields:['roomProject.mainSignal','ztxxDisplay'],
					data:[['覆盖良好','覆盖良好'],['无覆盖','无覆盖'],['弱覆盖','弱覆盖']]
				}),
				emptyText:'请选择主体信息...'
			},{
				name:'',
				fieldLabel:'<font color=red>*</font>&nbsp电梯最高层数',
				allowBlank:false
			},{
				xtype:'numberfield',
				name:'roomProject.underParkCarNumber',
				fieldLabel:'<font color=red>*</font>&nbsp地下车库车位数量',
				allowBlank:false
			},{
				xtype:'combo',
				fieldLabel:'紧急程度',
				hiddenName:'roomProject.emergencyLevel',
				readOnly : true,
				editable : false,
				mode:'local',
				triggerAction : 'all',
				valueField : 'roomProject.emergencyLevel',
				displayField : 'jjDisplay',
				store: new Ext.data.SimpleStore({
					fields:['roomProject.emergencyLevel','jjDisplay'],
					data:[['可缓','可缓'],['一般','一般'],['紧急','紧急']]
				}),
				emptyText:'请选择紧急程度...'
			}]
		},{
			columnWidth :1,
			layout : 'form',
			labelWidth : 120,
			bodyStyle : 'padding-right:5px;',
			border:false,
			defaults : {
				border:false,
				xtype : 'textarea',
				anchor : '99%'
			},
			items:[{
				name:'roomProject.remark',
				fieldLabel:'备注信息'
			}]
		}],
		buttons:[{
			text:'提交',
			handler:function(){
				var form=Ext.getCmp("h-form-createfgysform");
				form.getForm().submit();
			}
		},{
			text:'取消',
			handler:function(){
				var form=Ext.getCmp("h-form-createfgysform");
				form.getForm().reset();
			}
		}],
		listeners:{
			
		}
	}
};

/*
 *覆盖延伸弹出窗口 
 */
Hxcy.main.fgys.Win={
		id:'x-window-createsitewinform',
		title:'新建项目',
		xtype:'',
		layout:'fit',
		width:1200,
		height:350,
		pageX:40,
		pageY:150,
		modal:true,
		collapsed:true,
		closeAction:'hide',
		items:Hxcy.main.fgys.Form.fgysForm,
		bodyStyle:'padding:5px;',
		buttonAlign:'center',
		buttons:[{
			text:'提交',
			handler:function(){
			}
		},{
			text:'取消',
			handler:function(){
				
			}
		}]
};
